<div id="tiga_ba">
	<div id="tiga_baa">Ubah Data Kabupaten</div>
	<div id="tiga_bab"></div>
	<div class="clear"></div>
</div>
            
<?php
	$id="$_GET[id]";
	$sql="select * from kabupaten where id_kabupaten = '$id'";
	$qry=mysql_query($sql);
	$hasil=mysql_fetch_array($qry);
?>
<form action="utama.php?module=mod_kabupaten&act=update" onsubmit="return gsValidate('kabupaten','Nama Kabupaten Harus Diisi','required');" method="post" enctype="multipart/form-data">
	<table style="margin: 10px 15px 10px 15px;">
		<tr>
			<td>Kode Kabupaten</td>
			<td>&nbsp;</td>
			<td><input name="kode" type="text" id="kode" value="<?php echo $hasil['id_kabupaten']?>" class="input_small" disabled/></td>
		</tr>
		<tr>
			<td>Nama Kabupaten</td>
			<td>&nbsp;</td>
			<td>
				<input name="kabupaten" type="text" class="input2" id="kabupaten" maxlength="50" value="<?php echo $hasil['kabupaten']?>"/>
				<input name="id_kabupaten" type="hidden" id="id_kabupaten" value="<?php echo $hasil['id_kabupaten']?>" />
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>Provinsi</td>
			<td>&nbsp;</td>
			<td>
				<select name="provinsi" id="provinsi" class="input2">
					<?php
						$provinsi = mysql_query("select * from propinsi where aktif = 'Y' order by propinsi");
						while($p = mysql_fetch_array($provinsi)){
							if($p['id_propinsi'] == $hasil['id_propinsi']){
								$s = "selected";
							}else{
								$s = "";
							}
							echo "<option value='$p[id_propinsi]' $s>$p[propinsi]</option>";
						}
					?>
				</select>
			</td>
		</tr>
		<tr>
			<td>Status</td>
			<td>&nbsp;</td>
			<td>
				<?php
					if($hasil['aktif'] == 'Y'){
						echo "<input type='radio' name='status' value='Y' checked>Aktif
						<input type='radio' name='status' value='N'>Tidak Aktif";
					}else{
						echo "<input type='radio' name='status' value='Y' >Aktif
						<input type='radio' name='status' value='N' checked>Tidak Aktif";
					}
				?>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td><input name="submit" type="submit" class="button" value="Ubah" /></td>
		</tr>
	</table>
</form>		
            
        